From b082fb598d75c413ce751395fa7c51c33151a03b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timm=20B=C3=A4der?= Date: Thu, 13 Oct 2016 15:26:03 +0200 Subject: [PATCH] gtkwindow: Stop checking gtk-menu-bar-accel --- gtk/gtkwindow.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 34b1e7c411..03a9689e95 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -149,6 +149,7 @@ * widget that is added as a titlebar child. */ +#define MENU_BAR_ACCEL "F10" #define MNEMONICS_DELAY 300 /* ms */ #define NO_CONTENT_CHILD_NAT 200 /* In case the content (excluding header bar and shadows) of the window @@ -10545,28 +10546,17 @@ gtk_window_activate_menubar (GtkWindow *window, GdkEventKey *event) { GtkWindowPrivate *priv = window->priv; - gchar *accel = NULL; guint keyval = 0; GdkModifierType mods = 0; - g_object_get (gtk_widget_get_settings (GTK_WIDGET (window)), - "gtk-menu-bar-accel", &accel, - NULL); - - if (accel == NULL || *accel == 0) - return FALSE; - - gtk_accelerator_parse (accel, &keyval, &mods); + gtk_accelerator_parse (MENU_BAR_ACCEL, &keyval, &mods); if (keyval == 0) { - g_warning ("Failed to parse menu bar accelerator '%s'", accel); - g_free (accel); + g_warning ("Failed to parse menu bar accelerator '%s'", MENU_BAR_ACCEL); return FALSE; } - g_free (accel); - /* FIXME this is wrong, needs to be in the global accel resolution * thing, to properly consider i18n etc., but that probably requires * AccelGroup changes etc. -- 2.30.2